package net.melon.agency.pojo;


import java.util.Date;

import net.esj.basic.pojo.AbstractPojo;
import net.esj.basic.pojo.business.Holder;

public class Agency extends AbstractPojo<String> implements java.io.Serializable,Holder{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6304409466992863290L;
	
	public static final int AGENCY_STATE_NOT_PASS = -1;
	public static final int AGENCY_STATE_NEED_VERIFY = 0;
	public static final int AGENCY_STATE_NORMAL= 1;
	
	public static final String MOBJECT_TYPE = "AGENCY";
	
	public static enum AgencyState{
		
		NORMAL(0),
		STOP(1);
		
		private int state;

		private AgencyState(int state) {
			this.state = state;
		}

		public int getState() {
			return state;
		}
		
		public static AgencyState valueOf(int state){
			for(AgencyState os : values()){
				if(os.getState()== state){
					return os;
				}
			}
			return null;
		}
		
	}
	
	private String id;
	private String parentId;
	private String name;
	private String address;
	private String mobile;
	private String linkMan;
	private Date gmtCreate;
	private int state;
	private int tradeChannel;
	private boolean deleted;
	private String creatorId;
	private String creatorType;
	private int type;
	private Long regionId;
	private Agency parent;
	public Agency() {
		super();
	}
	public Agency(String id) {
		super();
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}


	public String getParentId() {
		return parentId;
	}



	public void setParentId(String parentId) {
		this.parentId = parentId;
	}



	public Agency getParent() {
		return parent;
	}



	public void setParent(Agency parent) {
		this.parent = parent;
	}



	public String getName() {
		return name;
	}



	public void setName(String name) {
		this.name = name;
	}



	public String getAddress() {
		return address;
	}



	public void setAddress(String address) {
		this.address = address;
	}



	public String getMobile() {
		return mobile;
	}



	public void setMobile(String mobile) {
		this.mobile = mobile;
	}



	public String getLinkMan() {
		return linkMan;
	}



	public void setLinkMan(String linkMan) {
		this.linkMan = linkMan;
	}



	public Date getGmtCreate() {
		return gmtCreate;
	}



	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public int getState() {
		return state;
	}

	public int getTradeChannel() {
		return tradeChannel;
	}

	public void setTradeChannel(int tradeChannel) {
		this.tradeChannel = tradeChannel;
	}

	public void setState(int state) {
		this.state = state;
	}


	public boolean isDeleted() {
		return deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	public String getCreatorId() {
		return creatorId;
	}

	public void setCreatorId(String creatorId) {
		this.creatorId = creatorId;
	}

	public String getCreatorType() {
		return creatorType;
	}

	public void setCreatorType(String creatorType) {
		this.creatorType = creatorType;
	}

	public String getMType() {
		return MOBJECT_TYPE;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public Long getRegionId() {
		return regionId;
	}

	public void setRegionId(Long regionId) {
		this.regionId = regionId;
	}
}


